<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::get('map','Index/map');
Route::get('baiduMap','Index/baiduMap');
Route::get('company_about','Index/company_about');
Route::get('user_agree','Index/user_agree');
Route::get('oss','Oss/index');
Route::get('oss','Oss/index');

//Route::domain('it','backstage'); //绑定域名

//Route::domain('backstage',function(){

    //后台
    Route::group('backstage', function () {


        Route::rule('login.movie.fly', 'Index/login');//登录
        Route::rule('verify', 'Index/verify');//验证码
        Route::get('test','Index/test');

//        Route::group('', function(){  //登录中间件
//            Route::get("", ');
            Route::get("index", function(){
                return '';
            });
            Route::rule('fly.movie', 'Index/index');
            Route::rule('welcome', 'Index/welcome');
            Route::rule('unicode', 'Index/unicode');
            Route::get('service','index/service');

//            Route::group('', function(){  //权限中间件

                Route::resource('auth','Auth');  //权限管理
                Route::post('auth/delete_all','Auth/deleteAll');

                Route::resource('role','Role');  //角色管理
                Route::post('role/delete_all','role/deleteAll');

                Route::resource('admin','Admin');  //管理员管理
                Route::post('admin/delete_all','admin/deleteAll');
                Route::post('admin/change_status','admin/change_status');
                Route::get('admin/recycle','admin/recycle'); //回收站
                Route::post('admin/restore','admin/retore'); //还原

                Route::get('resource/image_folder','Resource/image_folder');  //图片文件夹页面
                Route::get('resource/folder_list','Resource/folder_list');    //获取文件夹列表
                Route::rule('resource/create_folder/:folder_type','Resource/create_folder');  //创建文件夹
                Route::rule('resource/update_folder_name','Resource/update_folder_name');  //修改文件夹名称
                Route::rule('resource/delete_folder','Resource/delete_folder');  //删除文件夹
                Route::rule('resource/upload_file','Resource/upload_file');  //上传图片
                Route::rule('resource/upload_image_all','Resource/upload_image_all');  //批量上传图片
                Route::get('resource/file_list','Resource/file_list');  //图片列表
                Route::get('resource/file_select_list','Resource/file_select_list');  //图片列表
                Route::rule('resource/delete','Resource/delete');  //删除
                Route::rule('resource/delete_all','Resource/delete_all');  //批量删除

                Route::resource('movietype','MovieType');  //课程分类
                Route::resource('userlevel','UserLevel');  //课程分类
                Route::resource('usersales','UserSales');  //课程分类
//                Route::resource('updatelevel','User/updateLevel');  //课程分类
//                Route::resource('lesson','Lesson');  //课程分类

                Route::get('readAudio','Index/readAudio');

//            })->middleware('CheckAuth');
//        })->middleware('CheckLogin');

    })->prefix('backstage/');

//});